package com.onepunch.common;

/**
 * @Author: yx
 * @Date: 2025/10/31 15:59
 * @Description:
 **/

import com.github.pagehelper.PageInfo;
import lombok.Data;

import java.util.List;

/**
 * @projectName: onePunch
 * @package: com.onepunch.common
 * @className: PageResult
 * @author: yx
 * @description:
 * @date: 2025/10/31 15:59
 * @version: 1.0
 */
@Data
public class PageResult {
    private long total; // 总条数
    private List<?> list; // 当前页数据
    private int pageNum; // 当前页
    private int pageSize; // 每页条数

    public PageResult(PageInfo<?>  pageInfo) {
        this.total = pageInfo.getTotal();
        this.list = pageInfo.getList();
        this.pageNum = pageInfo.getPageNum();
        this.pageSize = pageInfo.getPageSize();
    }
}
